package dao.hibernate;

import java.util.List;

import model.YKienBanDoc;
import dao.YKienBanDocDAO;

public class YKienBanDocDAOHibernate extends GenericHibernateDAO<YKienBanDoc, Long> implements YKienBanDocDAO{
	@SuppressWarnings("unchecked")
	@Override
	public List<YKienBanDoc> findAllYKienBanDocByIdBaiViet(long idBaiViet) {
		return getSession()
		.createQuery(
				"FROM YKienBanDoc AS yKien WHERE yKien.baiViet.idBaiViet = :pname")
		.setLong("pname", idBaiViet).list();
	}
}
